<template>
  <view class="pdt-2">
    <view class="">
      <view v-for="(item, index) of userInfo.systemConfigList || []" :key="index">
        <view
          class="pd-2 dis-f align-center"
          style="padding: 12px; display: flex; align-items: center"
          :class="type === item.name ? 'active-row' : ''"
          @click="onSubmit(item)"
          v-if="allList || userInfo.isDemo == 1 || (userInfo.isDemo != 1 && item.name == 'pay_ls')"
        >
          <u-icon color="#09bb07" name="weixin-fill" size="50" v-if="item.name === 'pay_weixin'"  />
          <u-icon color="#F86316" name="weixin-fill" size="50" v-else-if="item.name === 'pay_yue'"  />
          <image src="@/static/tempIcon/lsIcon.png" style="width: 48rpx; height: 48rpx" v-else />
          <view class="mgl-2">
            <p class="font-s14" style="font-size: 28rpx">{{ item.title }}</p>
            <p class="color03 font-s12" style="font-size: 24rpx; color: #333;" v-if="item.name === 'pay_yue'">可用余额:{{ userInfo.nowMoney }}</p>
            <p class="color03 font-s12" style="font-size: 24rpx; color: #333;" v-else>快捷支付</p>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    allList: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      onShow: false,
      type: "pay_ls",
      userInfo:uni.getStorageSync("userInfo"),
    };
  },
  methods: {
    onSubmit(data) {
      this.type = data.name;
      this.$emit("onChange", data.name);
    },
  },
};
</script>

<style scoped>
.active-row {
  border: 1px solid #f86316;
  border-radius: 16rpx;
}
</style>
